Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Subdivision Styles

Labels

ASCII
SubdivisionStyle
Binary
sbdv ( = 0x7364636C )

Subdivision Method Enum Data Type

Constant
0x00000000
WorldSpace
0x00000001
ScreenSpace
0x00000002

There are two data formats.

First Data Format

SubdivisionMethodEnum                   subdivisionMethod
Float32                                 value1
subdivisionMethod
The value in this field must be one of the specifiers WorldSpace or ScreenSpace . A value of WorldSpace indicates that the renderer subdivides a curve (or surface) into polylines (or polygons) whose sides have a world-space length that is at most as large as the value specified in the value1 field. A value of ScreenSpace indicates that the renderer subdivides a curve (or surface) into polylines (or polygons) whose sides have a length that is at most as large as the number of pixels specified in the value1 field.
value1
For world-space subdivision, the maximum length of a polyline segment (or polygon side) into which a curve (or surface) is subdivided. For screen-space subdivision, the maximum number of pixels in a polyline segment (or polygon side) into which a curve (or surface) is subdivided. The value in this field should be greater than 0.

Data Size

8

Second Data Format

SubdivisionMethodEnum                   subdivisionMethod
Uns32                                   value1
Uns32                                   value2
subdivisionMethod
The value in this field must be the specifier Constant . This value indicates that the renderer subdivides a curve into a number of polyline segments and a surface into a mesh of polygons.
value1
The number of polylines into which a curve should be subdivided, or the number of vertices in the u parametric direction of the polygonal mesh into which a surface is divided. The value in this field should be greater than 0.
value2
The number of vertices in the v parametric direction of the polygonal mesh into which a surface is divided. The value in this field should be greater than 0.

Data Size

12

Description

A scene's subdivision style determines how a renderer decomposes smooth curves and surfaces into polylines and polygonal meshes for display purposes. Different specifiers and numerical values determine different degrees of fineness of approximation.

Parent Hierarchy

Shared, shape, style.

Parent Objects

None.

Child Objects

None.

Example

BeginGroup ( DisplayGroup ( )
    SubdivisionStyle ( Constant 32 32 )
    Ellipsoid ( ... )
    )
    Container (
        SubdivisionStyle ( WorldSpace 12 )
        Box ( ... )
    )
EndGroup ( )

© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |